<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a4j="http://richfaces.org/a4j" 
	xmlns:rich="http://richfaces.org/rich"
	xmlns:mir="http://www.miranteinfo.com/seam/taglib"
	xmlns:mirfn="http://www.miranteinfo.com/seam/functions">
<ui:composition>

	<rich:panel>
	    <f:facet name="header">Mir Test</f:facet>
	    
	    #{mirTest.run(suit)}
	    
    	<rich:dataTable value="#{mirTest.result.tests}" var="test">
    		<f:facet name="header">
	    		<rich:columnGroup>
	 				<rich:column>
	 					<h:panelGrid columns="1" style="text-align: left;">
		 					<h:outputText value="Total: #{mirTest.result.totalTests}"/>
		 					<h:outputText value="Failures: #{mirTest.result.totalFailures}"/>
		 					<h:outputText value="Execution Time: #{mirTest.result.executionTime} ms"/>
	 					</h:panelGrid>
	 				</rich:column>
	 			</rich:columnGroup>
	 		</f:facet>
 			
 			<rich:column>
				<s:graphicImage value="/com/miranteinfo/seam/facelets/images/success.png" rendered="#{!test.failed}"/>
				<s:graphicImage value="/com/miranteinfo/seam/facelets/images/error.gif" rendered="#{test.failed}"/>

				<rich:spacer width="5"/>

				<h:outputText value="#{test.name} ( #{test.executionTime} ms )"/>
				
				<br />
				
				<a4j:repeat value="#{test.tests}" var="t">
					<rich:spacer width="30"/>
				
					<s:graphicImage value="/com/miranteinfo/seam/facelets/images/success.png" rendered="#{!t.failed}"/>
					<s:graphicImage value="/com/miranteinfo/seam/facelets/images/error.gif" rendered="#{t.failed}"/>
					
					<rich:spacer width="5"/>
					
					<h:outputText value="#{t.name} ( #{t.executionTime} ms )"/>
					
					<br />
				</a4j:repeat>
				
 			</rich:column>
    	</rich:dataTable>
    </rich:panel>

</ui:composition>
</html>
